function openDialog(xhr, status, args) {
    if (args && args.action && !args.validationFailed) {
        return true;
    } else {
        return false;
    }
}

function closeDialog(xhr, status, args) {
    if (args && args.action && !args.validationFailed) {
        return true;
    } else {
        return false;
    }
}